package com.sit.estatemanagementserver.service;

import com.sit.estatemanagementserver.dao.ComplaintDao;
import com.sit.estatemanagementserver.enity.Complaint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ComplaintService {
    @Autowired
    private ComplaintDao complaintDao;

    public boolean addComplaint(Complaint complaint) {
        // 无需修改，逻辑保持不变
        return complaintDao.addComplaint(complaint);
    }

    public List<Complaint> getComplaintsByOwner(String ownerPhone) {
        return complaintDao.getComplaintsByOwner(ownerPhone);
    }
}